home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 90 / CD Actual 90.iso / Software3D / VirtualLight / VLight1.3win32.exe / Examples / Level2 / caustics.vs < prev    next >
Encoding:
Text File  |  2002-10-07  |  3.0 KB  |  117 lines

  1. ReadArchive "statics.vib"
  2. ReadArchive "colors.vib"
  3.  
  4. static pattern1map = SpectrumOfColors(
  5.    [0.000, '0.698, 0.533, 0.122', 0.115, '0.529, 0.173, 0.071']
  6.    [0.115, '0.529, 0.173, 0.071', 0.230, '0.698, 0.533, 0.122']
  7.    [0.230, '0.698, 0.533, 0.122', 0.336, '0.424, 0.325, 0.075']
  8.    [0.336, '0.424, 0.325, 0.075', 0.460, '0.698, 0.533, 0.122']
  9.    [0.460, '0.698, 0.533, 0.122', 0.628, '0.306, 0.235, 0.055']
  10.    [0.628, '0.306, 0.235, 0.055', 0.708, '0.698, 0.341, 0.122']
  11.    [0.708, '0.698, 0.341, 0.122', 0.796, '0.000, 0.000, 0.000']
  12.    [0.796, '0.000, 0.000, 0.000', 0.858, '0.596, 0.373, 0.106']
  13.    [0.858, '0.596, 0.373, 0.106', 0.982, '0.494, 0.376, 0.086']
  14.    [0.982, '0.494, 0.376, 0.086', 1.001, '0.698, 0.533, 0.122'])
  15.  
  16. static pattern2map = SpectrumOfColors(
  17.    [0.000, '0.824, 0.725, 0.584', 0.168, '0.514, 0.584, 0.533']
  18.    [0.168, '0.514, 0.584, 0.533', 0.301, '0.298, 0.376, 0.318']
  19.    [0.301, '0.298, 0.376, 0.318', 0.398, '0.263, 0.337, 0.282']
  20.    [0.398, '0.263, 0.337, 0.282', 0.558, '0.431, 0.506, 0.451']
  21.    [0.558, '0.431, 0.506, 0.451', 0.655, '0.529, 0.631, 0.471']
  22.    [0.655, '0.529, 0.631, 0.471', 0.735, '0.333, 0.376, 0.318']
  23.    [0.735, '0.333, 0.376, 0.318', 0.823, '0.298, 0.376, 0.318']
  24.    [0.823, '0.298, 0.376, 0.318', 0.876, '0.416, 0.376, 0.318']
  25.    [0.876, '0.416, 0.376, 0.318', 0.929, '0.416, 0.376, 0.318']
  26.    [0.929, '0.416, 0.376, 0.318', 1.001, '0.824, 0.725, 0.584'])
  27.  
  28. static noisy_functionA = fmod(|Po|+noise(Po, 3), 1)
  29. static noisy_functionB = fmod(|Po|+scnoise(Po, 4), 1)
  30.  
  31. Declare component1 = Shader [ FunctionalSurface [
  32.   Color pattern1map[noisy_functionA]
  33.   Kd 0.95
  34.   Ks 0.05
  35.   BlinnSpecularBRDF 5
  36.  ]
  37. ]
  38.  
  39. Declare component2 = Shader [ FunctionalSurface [
  40.   Color pattern1map[noisy_functionB]
  41.   Kd 0.95
  42.   Ks 0.05
  43.   BlinnSpecularBRDF 5
  44.  ]
  45. ]
  46.  
  47. Declare ground = Shader [ Composite [ (component1, 0.6) , (component2, 0.4) ] ]
  48.  
  49. Declare glass_R = Shader [ FunctionalSurface [
  50.   Color '0,0,0'
  51.   Ka 0.025
  52.   Kd 0.0
  53.   Ks 0.25
  54.   Kt (0.98*|N . I|, 1.35, '1,.5,.5')
  55.   Kr 0.2
  56.   BlinnSpecularBRDF 6
  57.   Caustics (0.6,InternalCaustics)
  58.  ]
  59. ]
  60.  
  61. Declare glass_G = Shader [ FunctionalSurface [
  62.   Color '0,0,0'
  63.   Ka 0.025
  64.   Kd 0.0
  65.   Ks 0.25
  66.   Kt (0.98*|N . I|, 1.35, '.5,1,.5')
  67.   Kr 0.2
  68.   BlinnSpecularBRDF 6
  69.   Caustics (0.6,InternalCaustics)
  70.  ]
  71. ]
  72.  
  73. Declare glass_B = Shader [ FunctionalSurface [
  74.   Color '0,0,0'
  75.   Ka 0.025
  76.   Kd 0.0
  77.   Ks 0.25
  78.   Kt (0.98*|N . I|, 1.35, '.7,.7,1')
  79.   Kr 0.2
  80.   BlinnSpecularBRDF 6
  81.   Caustics (0.6,InternalCaustics)
  82.  ]
  83. ]
  84.  
  85. Declare mirror = Shader [ PlainSurface [
  86.   Ka 0
  87.   Kd 0
  88.   Ks 0
  89.   Kr 1
  90.   Caustics 0.6
  91.  ]
  92. ]
  93.  
  94. Declare glass_Y = Shader [ FunctionalSurface [
  95.   Color '0,0,0'
  96.   Ka 0.025
  97.   Kd 0.0
  98.   Ks 0.25
  99.   Kt (0.965*|N . I|, 1.39, yellow)
  100.   Kr 0.2
  101.   CookSpecularBRDF 6
  102.   Caustics 0.5
  103.  ]
  104. ]
  105.  
  106. Declare glass_C = Shader [ FunctionalSurface [
  107.   Color coral
  108.   Ka 0.025
  109.   Kd 0.0
  110.   Ks 0.25
  111.   Kt (0.98*|N . I|, 1.4, coral)
  112.   Kr 0.2
  113.   CookSpecularBRDF 5
  114.   Caustics 0.5
  115.  ]
  116. ]
  117.